home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
U-Utilities
/
(c)u3.d64
/
disk doctor.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-11
|
6KB
|
161 lines
0 DN=8:REM DEVICE #
2 POKE53280,11:POKE53281,0:DIMA$,I,S$,T$,CC,B,SS,E$,J,TE,A:GOTO78
4 GETA$:IFCC<292THENIFA$>""THENPRINT" ";:CC=293:RETURN
6 IFA$=""THEN252
8 CC=293:RETURN
10 IFI<0THENI=280+I:IFI>255THENI=I-40
12 IFI>255THENI=I-INT(I/40)*40
14 PRINT""SPC(10)PEEK(SS+I)"[157] ":PRINT""SPC(10)I"[157] "
16 PRINT"VALUE: ":PRINT"POSITION:"
18 FORJ=1TO2:POKEI+SS,(PEEK(I+SS)+128)AND255:FORD=0TO1:NEXTD,J
20 GOSUB4:IFA$=""THEN18
22 IFPFTHEN66
24 IFA$=""THENI=(I+1)AND255:GOTO14
26 IFA$="[157]"THENI=(I-1)AND255:GOTO14
28 IFA$="[145]"THENI=I-40:GOTO10
30 IFA$=""THENI=I+40:GOTO10
32 IFA$=""THENI=0:GOTO10
34 IFA$="N"THENT$=STR$(PEEK(SS)):S$=STR$(PEEK(SS+1)):GOTO128
36 IFA$="J"THENT$=STR$(PEEK(SS+I)):S$=STR$(PEEK(SS+I+1)):GOTO128
38 IFA$="Q"THENPRINT#15,"I0":RUN
40 IFA$="+"THENS$=STR$(VAL(S$)+1):GOTO128
42 IFA$="-"THENS$=STR$((VAL(S$)-1)*SGN(VAL(S$))):GOTO128
44 IFA$="R"THEN174
46 IFA$="B"THEN116
48 IFA$="T"THENPRINT"":GOSUB218:PRINT"":GOSUB218:GOTO64
50 IFA$=CHR$(3)THEN74
52 IFA$<>"@"THEN10
54 IFI<0THENI=280+I:IFI>255THENI=I-40
56 IFI>255THENI=I-INT(I/40)*40
58 PRINT""SPC(10)PEEK(SS+I)"[157] ":PRINT""SPC(10)I"[157] "
60 POKE198,0:PRINT"NEW VALUE: ";:INPUT#9,B$:PRINT
62 PRINT"[145]"SPC(20)" ":B=VAL(B$):GOTO166
64 PRINT" [208]RESS [[210][197][212][213][210][206]] TO END TEXT MODE":PF=1:GETA$:GOTO10
66 IFA$=CHR$(13)THENPF=0:PRINT"":GOSUB202:GOTO10
68 IFA$=""THEN20
70 B=ASC(A$):GOTO168
72 PRINT"":GOSUB202:GOTO10
74 PRINT#15,"I0":PRINT"":IFPEEK(788)=52THENPOKE788,49
76 PRINT" ";:END:RUN
78 A=828:TEM=A:REM FILEREAD
80 POKE210,INT(A/256):POKE209,A-256*PEEK(210):POKE211,0
82 PRINT""CHR$(34)CHR$(34)CHR$(20)"[146]B [198][191] [146]@ [164][191]Y[146][184]D[200][208][183][146][204][204][191]"
84 IFPEEK(788)=49THENPOKE788,52:REM STOP KEY DISABLE
86 PRINT"[153]";
88 SS=1024+120:I=0:B=0:J=0
90 A$="":E$="":T$="":S$=""
92 PRINT"[147][153][208]LEASE PUT THE [211][201][195][203] [196][201][211][203] IN DRIVE 0."
94 PRINT"[217]OU SHOULD USE THE [196][207][211] '[214]' COMMAND TO"
96 PRINT"UPDATE THE [194][193][205] ON THE DISK WHEN DONE."
98 PRINT"[206]OTE: [196]ISK DEVICE IS"DN"[157]."
100 PRINT"[208]RESS [193][206][217] [203][197][217] TO CONTINUE"
102 GOSUB4:IFA$=""THEN102
104 GOSUB10021:IFA$=CHR$(3)THEN74
106 OPEN1,DN,2,"0:[160][160][160],S,R":INPUT#15,E$:IFE$="62"THENCLOSE1:GOTO114
108 IFE$>"64"THENINPUT#1,E$:PRINT"[147]"E$" ON DRIVE 0"
110 IFE$="21"THENGOSUB184
112 PRINT#15,"I0"
114 OPEN2,DN,2,"#2":PRINT"[147]"
116 GOSUB192
118 PRINT" [212][210][193][195][203] "MID$(STR$(VAL(T$)),2)"[160]"
120 PRINT" [211][197][195][212][207][210] "MID$(STR$(VAL(S$)),2)"[160][145][145]
122 [153]"RIGHT$NPUT (null)(null)ATNLEN(null): ";:[132]9,T$:[153]:[139]T$[178][199](160)[167]74
124 [153]"ON ":[153]"RIGHT$NPUT (null)VALLEN(null)(null)(null): ";:[132]9,S$:[153]:[139]S$[178][199](160)[167]74
126 [153]"ON ":T$[178][202]([196]([197](T$)),2):S$[178][202]([196]([197](S$)),2)
128 [139][197](T$)[178]0[167]116
130 [153]" "
132 [153]" "
134 [153]" "
136 [152]15,"U1:2,0,"T$","S$:[143] CH2 DR0
138 [132]15,E1$,E2$,E3$,E4$:[139]E1$[178]"00"[167]156
140 [141]192:E2$[178]" STR$RIGHT$(null)(null) VAL(null)(null)(null)(null) #"[170]E1$[170]","[170]E2$
142 [153]"":[129]I[178]1[164][195](E2$):[153]"AND";:[130]:[153]:[153]""E2$
144 [129]I[178]1[164][195](E2$):[153]"TAB(";:[130]:[153]
146 [153]"IN (null)(null)ATNLEN(null)"[197](E3$)"CMD, (null)VALLEN(null)(null)(null)"[197](E4$):[139]E1$[178]"66"[167]118
148 [153]"TRY AGAIN? (CR/N OR Y)"
150 [161]A$:[139]A$[178]""[167]150
152 [139]A$[178]"Y"[167]136
154 [152]15,"I0":[138]
156 [141]192:[152]15,"B-P:2,0":[143] CH2 POS1
158 [158]TEM
160 I[178]0
162 [153]:[151]198,0
164 [137]10
166 [139]B[177]255[176][198](B$)[178]160[167]174
168 [151]SS[170]I,B:
170 [152]15,"B-P:2,"[196](I):[152]2,[199](B);
172 I[178]I[170]1:[137]164
174 [153]"ATN(null)VAL (null)(null)(null) (null)(null)(null)VAL (N OR Y)"
176 [161]A$:J[178][171](A$[178]"Y")[171]2[172](A$[178]"N")[171]3[172](A$[178][199](3)):[145]J[137]178,72,74:[137]176
178 [152]15,"M-W"Z$[199](19)[199](2)[199]([194](SS))[199]([194](SS[170]1))
180 [152]15,"U2:2,0,"T$","S$
182 [152]15,"I0":[138]
184 [153]"NO DISK IN DRIVE 0
186 PRINT"PLACE DISK IN DRIVE 0, PRESS ANY KEY
188 [161]A$:[139]A$[178]""[167]188
190 [142]
192 [153]"ONORTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN^ ORTANTANTANTANTANTANTANTAN^ORTANTANTANTANTANTANTANTANTAN^";
194 [153]"(null)STR$ISK STR$OCTOR 64.0(null) (null)(null)(null)ATNLEN(null):"[201](" "[170]T$,2)"(null)(null)(null)VALLEN(null)(null)(null):"[201](" "[170]S$,2)"(null)";
196 [153]">TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN>TAN>TANTANTANTANTANTANTANTAN>>TANTANTANTANTANTANTANTANTAN>";
198 [129]I[178]1[164]8:[153]" ";:[130]
200 [153]"ORTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANEXP"
202 [153]"PRESS [@] - LENHANGE BYTE UNDER CURSOR "
204 [153]" [(null)] - CHR$O TO (null)WAITEXT BLOCK OF FILE "
206 [153]" [MID$] - MID$WAITUMP TO LINK UNDER CURSOR "
208 [153]" [(null)] - (null)WAITUIT "
210 [153]" [(null)] - (null)WAITEWRITE CURRENT BLOCK "
212 [153]" [PEEK] - (null)EW PEEKWAITLOCK "
214 [153]" [(null)] - ATNDD (null)WAITEXT STRING "
216 [153]" [+]/[-] - (null)CAN FORWARD/BACKWARD "
218 [129]D[178]1[164]5:[153]" ";:[130]
220 [129]D[178]217[164]242:[151]D,[194](D)[176]128:[130]:[153]"";
222 [142]
224 CV[178]1:CM$[178]"CHR$ET (null)(null)(null)(null)VAL(null), THE ULTIMATE PROGRAM MANIPULATION SYSTEM, AT ":[143]"GOSUBLOAD
226 CM$=CM$+"YOUR LOCAL DEALER. [201]T ADDS OVER 1100 NEW":REM"[141][147]
228 CM$[178]CM$[170]" EDITING AND DISK FUNCTIONS. (null)PEND LESS TIME CORRECTING YOUR "
230 CM$[178]CM$[170]"MISTAKES AND MORE TIME PROGRAMMING. ":[143]"GOSUBLOAD
232 CM$=CM$+"[193] [195]OMMODORE 64 WITHOUT [211][217][211][210][197][211] IS ONLY A [195]OMMODORE 63.5!"
234 RETURN:
236 CV=2:CM$="**[206][197][215]** FROM [211][207][204][201][196][213][211] [201][206][212][197][210][206][193][212][201][207][206][193][204]... "
238 CM$=CM$+"[211][207][204][201][196][197][216], THE PERSONAL DATA FILER. ":REM"[141][147]
240 CM$[178]CM$[170]"(null)TORE NOTES, RECORDS, RECIPES, ETC. ON ELECTRONIC INDEX CARDS. "
242 CM$[178]CM$[170]" LEFT$UNDREDS OF USES AROUND THE HOME ":[143]"GOSUBLOAD
244 CM$=CM$+"AND OFFICE. [211]EE IT AT YOUR LOCAL DEALER."
246 RETURN:
248 CV=2:CM$="[212]HIS PROGRAM HAS BEEN RELEASED TO PUBLIC DOMAIN COURTESY OF "
250 CM$=CM$+"[211]OLIDUS [201]NTERNATIONAL [195]ORPORATION":RETURN:"[141][147]
252 [139]CC[178]0[167][141]248
254 [139]CC[177]750[167]CC[178]0:[145]CV[141]236,224
256 CC[178]CC[170]1:[139]CC[177]292[167][142]:"GOSUBLOAD
258 PRINT"";
260 CP=INT(CC)
262 IFCP<39THENPRINTSPC(39-CP)LEFT$(CM$,CP)"";:RETURN:"[141][147]
264 [153][200]([200]([202](CM$,CP[171]38),39)[170]" ",39)""
266 [142]
10000 "GOSUBLOADSYS
10020 "[208]ROGRAM: ""[196]ISK [196]OCTOR 64"
10021 GOTO10123:"
10025 "
10030 "[193]UTHOR: [196]ON [204]EKEI
10035 "
10036 "
10040 "(null)HIS PROGRAM IS PROVIDED COURTESY OF:
10045 "
10050 " (null)OLIDUS RIGHT$NTERNATIONAL LENORPORATION
10060 " [211]UITE #5, 144 [215]EST 15TH [211]TREET
10070 " (null)ORTH (null)ANCOUVER, PEEK.LEN.
10075 " [208]HONE: (604)984-0477
10080 "
10090 "[212]O GET THE [205][193][216][201][205][213][205] USE OUT OF YOUR NEW
10100 "LENOMMODORE-64 COMPUTER AND YOUR DISK
10110 "DRIVE, WE RECOMMEND USING:
10123 Z$[178][199](0):[143]"GOSUBONCLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSEON
10124 OPEN15,DN,15:REM"[141][145][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][145]
10125 [159]9,0:[143]"GOSUBONCLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSECLOSEON
10126 RETURN:REM"[141][145][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][145]
10130 "GOSUB *** (null)(null)(null)(null)VAL(null) ***
10135 "
10140 " ""(null)HE (null)LTIMATE (null)ROGRAM (null)ANIPULATION
10150 " [211]YSTEM FOR [195]OMMODORE [205]ICROCOMPUTERS."
10170 "[141][158][206]OW AVAILABLE AT YOUR [195]OMMODORE DEALER.